package com.sitanyun.merchant.guide.frament.presenter.impl;

import com.sitanyun.merchant.guide.frament.model.impl.HistoryFModelImpl;
import com.sitanyun.merchant.guide.frament.model.inter.IHistoryFModel;
import com.sitanyun.merchant.guide.frament.presenter.callback.CallBack;
import com.sitanyun.merchant.guide.frament.presenter.inter.IHistoryFPresenter;
import com.sitanyun.merchant.guide.frament.view.inter.IHistoryFView;

public class HistoryFPresenterImpl implements IHistoryFPresenter {
    private IHistoryFView mIHistoryFView;
    private IHistoryFModel mIHistoryFModel;

    public HistoryFPresenterImpl(IHistoryFView fIHistoryFView) {
        mIHistoryFView = fIHistoryFView;
        mIHistoryFModel = new HistoryFModelImpl();
    }

    @Override
    public void gettodayuser( String online, String stars, String orderBy, String havePhone, String interactiveState) {
        mIHistoryFModel.settodayuser( online, stars, orderBy, havePhone, interactiveState, new CallBack() {
            @Override
            public void onSuccess(Object response) {
                mIHistoryFView.response(response,IHistoryFView.RESPONSE_ONE);
            }

            @Override
            public void onError(Throwable t) {
                mIHistoryFView.response(t,IHistoryFView.RESPONSE_TWO);
            }
        });
    }
}
